<template>
  <div class="pubChunk" :style="`margin-top: ${mt}px;`">
    <div class="pubChunk_head">
      <div class="flex-h-sb">
        <div class="title flex-v-center">
          <slot name="title"></slot>
        </div>
        <div class="head-left">
          <slot name="headLeft"></slot>
        </div>
      </div>
      <div class="subtitle">
        <slot name="subtitle"></slot>
      </div>
    </div>
    <div class="pubChunk_body">
      <slot></slot>
    </div>
    <template class="pubChunk_footer">
      <slot name="footer"></slot>
    </template>
  </div>
</template>

<script>
export default {
  name: 'PubChunk',
  props: {
    // 样式类
    mt: {
      type: Number,
      default: 0
    }
  }

}
</script>

<style lang="scss" >
.pubChunk {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  .pubChunk_head {
    padding: 12px 24px;
    border-bottom: 1px solid #E8E8E8;
    .title {
      font-size: 18px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #333333;
      line-height: 24px;
    }
    .subtitle {
      color: #666;
    }
  }
  
  .pubChunk_body {
    padding: 12px 24px;
    flex: 1;
    overflow: auto;
  }

  .pubChunk_footer {
    height: 50px;
    border-top: 1px solid #E8E8E8;
  }
}
</style>